package com.zline.foodraise.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.zline.foodraise.util.LUtil;

import java.util.ArrayList;

/**
 * Created by heshantao on 15/12/4.
 * 自定义FragmentAdapter
 */
public class CustomerFragmentAdapter extends FragmentStatePagerAdapter {
    private static final String LOG_TAG = CustomerFragmentAdapter.class.getSimpleName();
    ArrayList<Fragment> fragmentList;
    public CustomerFragmentAdapter(FragmentManager fm) {
        super(fm);
    }

    public void setFragments(ArrayList<Fragment> fragments) {
        this.fragmentList = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        //LUtil.i(LOG_TAG,"_______getItem____"+position);
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        //LUtil.i(LOG_TAG,"_______getCount____");
        return fragmentList.size();
    }

    @Override
    public int getItemPosition(Object object) {
        LUtil.i(LOG_TAG,"_______getItemPosition____");
        return POSITION_NONE;
    }
}
